import { useParams, useHistory } from 'react-router-dom'
import { Button } from 'antd'

export default function Detail() {
  const params = useParams()
  const history = useHistory()
  return (
    <div>
      <p>Detail--{params.id}</p>
      <Button
        onClick={() => {
          history.push('/')
        }}
      >
        去首页
      </Button>
    </div>
  )
}
